package com.cauli.manage.operationLog.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;

/**
 * @author Cauli
 * @date 2023-03-28 12:00
 * @description 操作日志
 */
@Data
@TableName("operation_log")
@ApiModel(value = "OperationLog", description = "操作日志")
public class OperationLog implements Serializable {
    /**
     * 操作日志ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "operation_log_id")
    private Long operationLogId;

    /**
     * 操作资源
     */
    @TableField("source")
    private String source;

    /**
     * 操作详情
     */
    @TableField("detail")
    private String detail;

    /**
     * 操作名称
     */
    @TableField("operation")
    private String operation;

    /**
     * 平台(0 管理端 1网盘)
     */
    @TableField("platform")
    private Integer platform;

    /**
     * 请求类型
     */
    @TableField("request_method")
    private String requestMethod;

    /**
     * 请求URL
     */
    @TableField("request_url")
    private String requestUrl;

    /**
     * 操作结果
     */
    @TableField("result")
    private String result;

    /**
     * 终端IP地址
     */
    @TableField("terminal")
    private String terminal;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 操作时间
     */
    @TableField("time")
    private String time;
}
